//test.cc
#include <ctime>
#include <algorithm>
#include "MySort.hh"
using namespace My_Code;

int main()
{
    long diffTime,StartTime,EndTime;
    vector<int> test;
    for(int i= 0;i < 40;i++)
    {
        int temp = rand();
        test.push_back(temp);
    }
    vector<int>::iterator it = test.begin();
    while(it != test.end())
    {
        cout<<*it<<endl;
        it++;
    }
    cout<<"----------------------"<<endl;
    it = test.begin();
    StartTime = clock();
    //My_Sort(test);//14358158Ms
    //sort(test.begin(),test.end());//31141Ms
    //insertionsort(test);//6619689Ms
    shellsort(test);
    // mergesort(test);
    //heapsort(test);
    EndTime = clock();
    diffTime = EndTime - StartTime;
    while(it != test.end())
    {
        cout<<*it<<endl;
        it++;
    }
    cout<<"----------------------"<<endl;
    cout<<diffTime<<"Ms"<<endl;
    cin.get();
    return 0;
}